package com.jf3q.front.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jf3q.common.domain.EduTeacher;
import com.jf3q.common.service.impl.EduTeacherServiceImpl;
import com.jf3q.common.vo.ResultVo;
import com.jf3q.front.dto.pageCourse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TeacherController {

    @Autowired
    EduTeacherServiceImpl eduTeacherService;

    @PostMapping("/eduservice/teacherfront/getTeacherFrontList/{page}/{limit}")
    public ResultVo getTeacherFrontList(@PathVariable Integer page,
                                        @PathVariable Integer limit){

        LambdaQueryWrapper<EduTeacher> wrapper = new LambdaQueryWrapper<>();

        Page<EduTeacher> teacherPage = eduTeacherService.page(new Page<>(page, limit),wrapper);

        System.out.println(teacherPage.toString());

        return ResultVo.success("",teacherPage);
    }
}
